#ifndef __COMMANDMGR_H__
#define __COMMANDMGR_H__

#include <stl/list.h>
#include <standard/reference.h>


#define MAXCOMMANDPOOL (64)

class CCommandMgr: public CRefObject{
public:
    CCommandMgr();
    virtual ~CCommandMgr();
    void Init( class CEditorSceneMgr* pEditorSceneMgr );
    bool32 AddCommand( class CCommand* pCmd );
    bool32 Redo();
    bool32 Undo();
    void Clear();
    bool32 CanUndo();
    bool32 CanRedo();

private:
    class CEditorSceneMgr* m_pEditorSceneMgr;
	list<CCommand*>m_vCommandRedoQueue;
	list<CCommand*>m_vCommandUndoQueue;
	RefLinkList<CCommand*> m_vCommandRefList;
};



#endif

